#include<stdio.h>
#include<math.h>
int main()
{
	int X;
    scanf("%d",&X);
    double x1=X,x2;
    while(fabs(x2-x1)>=0.00001){
    	x2=(1.0/2)*(x1+1.0* X/x1);
	}
	printf("%.3lf",x2);
	return 0;
}